home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 14
/
014.d81
/
write guard
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
2KB
|
43 lines
5 gosub60000
10 c=53280:s=53265:d=59516:e=65126:pokec,34:pokec+1,2:poke808,234
20 print"[147]"tab(44)"put the disk to guard or un-guard"
30 printtab(12)"in the disk drive."
40 printtab(47)" press any key when ready ":gosub240:poke198,0:wait198,1
50 printtab(13)"[145][158] warning!! ":print" once guarded, only re-formatting or"
60 printtab(2)"using this program will again allow"
70 print" writing to this disk.":printtab(11)" continue? (y/n)":gosub240
80 getk$:ifk$="n"then250
90 ifk$<>"y"then80
100 printtab(16)"[145][153] okay "
110 open15,8,15,"i":open8,8,8,"#":print#15,"ua:"8;0;18;0:print#15,"b-p:"8;2
120 printtab(43)"enter 'g'[146] to guard the disk, or..."
130 printtab(9)"'u'[146] to un-guard the disk...":gosub240
140 getk$:ifk$<>"g"andk$<>"u"then140
150 p$="un-guarded.":ifk$="g"thenp$="guarded..."
160 printtab(16)"[145][159] okay ":printtab(43)" the disk is now being "p$"[158]":gosub240
170 ifk$="g"then210
180 print#8,"a";:print#15,"m-w";chr$(1);chr$(1);chr$(1);chr$(65)
190 print#15,"m-w";chr$(2);chr$(7);chr$(1);chr$(65)
200 print#15,"b-p:"8,165:print#8,"2a";:goto220
210 print#8,"4";:print#15,"b-p:"8,165:print#8,"wg";:
220 print#15,"ub:"8;0;18;0:close8:print#15,"i":close15:fori=1to2000:next
230 pokes,11:printtab(240)tab(255)"[155] all done [154]":goto260
240 fori=1to20:print"* [158]";:next:print:pokec,(peek(c)and15)+1:return
250 printtab(50)" program aborted "
260 pokes,27:fori=1to1500:next:poke808,237:goto63000
60000 t$=" ":c=0:c$="":print"[147]":poke53281,0
60030 printspc(7)""t$:printspc(7)" [215]rite [199]uard [146]"
60051 printspc(7)""t$:print:printtab(18)"by"
60060 print:printspc(14)"[210].[215]. [203]ober"
60070 print:printspc(12)"[195]opyright 1985"
60080 print:print:print:print" [204][207][193][196][211][212][193][210] is not public domain."
60090 print:print" [208]lease respect the author's rights."
60100 print:print" [208]ress space bar to continue."
60110 forcc=1to48:getk$:ifk$=" "then60130
60120 ifcc=1thenprintmid$(c$,c+2,1)"[145][145]";:c=not(c)
60125 next:goto60100
60130 printc$:return
63000 rem connect to l.s.
63010 print"[147]load"chr$(34)"payload"chr$(34)",8":print"run"
63020 poke631,13:poke632,13:poke198,2: end